package com.icangya.domain;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "fb_user_mission")
public class FbUserMission {  // 用户领取任务 记录

    private long id;//编号

    private long uid;//用户id

    private String openId;

    private String nickName;

    private String headImgUrl;

    private String missionName; //任务名

    private String missionContent;//任务类型

    private  long missionId;//任务id

    private  Timestamp createTime;//领取任务的时间

    private int status;//任务完成状态  0：完成  1:未完成   2：任务已过期

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "uid")
    public long getUid() {
        return uid;
    }

    public void setUid(long uid) {
        this.uid = uid;
    }

    @Basic
    @Column(name = "openid")
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Basic
    @Column(name = "nick_name")
    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    @Basic
    @Column(name = "headimg_url")
    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    @Basic
    @Column(name = "mission_id")
    public long getMissionId() {
        return missionId;
    }

    public void setMissionId(long missionId) {
        this.missionId = missionId;
    }

    @Basic
    @Column(name = "mission_name")
    public String getMissionName() {
        return missionName;
    }

    public void setMissionName(String missionName) {
        this.missionName = missionName;
    }

    @Basic
    @Column(name = "mission_content")
    public String getMissionContent() {
        return missionContent;
    }

    public void setMissionContent(String missionContent) {
        this.missionContent = missionContent;
    }



    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "status")
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public FbUserMission(long uid, String openId, String nickName, String headImgUrl, String missionName, String missionContent, long missionId, Timestamp createTime, int status) {
        this.uid = uid;
        this.openId = openId;
        this.nickName = nickName;
        this.headImgUrl = headImgUrl;
        this.missionName = missionName;
        this.missionContent = missionContent;
        this.missionId = missionId;
        this.createTime = createTime;
        this.status = status;
    }

    public FbUserMission() {
    }
}
